//
// Created by YE on 2024/1/3.
//

#include <ctime>
#include <iostream>
#include "machine/interpreter.h"
#include "common/ych_string.h"
int main(int argc, char *argv[]) {
    clock_t start_time = clock();
    Interpreter a = Interpreter();

        a.compiler("../a.ych");
    if (errorStack.empty()) {
        a.executor = new Executor();
        a.executor->execute();
    }
    while (!errorStack.empty()) {
        Error e = errorStack.top();
        std::cout<<e.errorInfo<<'\n';
        errorStack.pop();
    }
    printf("time:%05fs\n",((double) clock() - start_time) / CLOCKS_PER_SEC);
    return 0;
}